
<ion-modal-view ng-controller="${widgetCode}Ctrl">
  <ion-header-bar class="bar bar-header bar-positive">
	 <button ng-click="closeModal()" class="button back-button buttons button-clear header-item">
		<i class="icon ion-android-arrow-back"></i> 
     </button>   
     <h1 class="title">{{modalTitle}}</h1>
  </ion-header-bar>
  <ion-content>
  <form name ="EvectionReimburseForm">
	<div class="content">
	
		<div>
			<div class="stable-bg content division-div"><strong>补助信息</strong></div>
		</div>
		
		<div class="row" ng-show="{{projectSelectShow}}" ng-if="projectSelectShow">
      		<div class="col col-20">
        		<p style="height: 28px;line-height: 28px;">项目组&nbsp;:</p>
      		</div>
      		<div class="col col-30 ">
            	<div style="padding:2px;height:28px;border-radius:4px;background:#eeeeee;border-style:solid;">
            		<select ng-model="evectionData.projectId" name="projectId" style="border: none;outline:none;background-color: transparent;width: 100%;" data-tap-disabled="true" required>
                		<option ng-repeat="x in projectSelect" value = "{{x.code}}" ng-selected="{{x.selected}}" >{{x.name}}</option>
            		</select>
      			</div>
      		</div>
       		<div class="col">
	          <p style="height: 28px;line-height: 28px;color:red" ng-show="EvectionReimburseForm.projectId.$error.required">(必选)</p>
	      </div>
    	</div>
		
    	<div class="row">
	    	<div class="col col-20">
	        	<p class="line-height-28">同行人&nbsp;:</p>
	    	</div>
	        <div class="col item-input-inset">
	        	<label class="item-input-wrapper">
	        		<input type="text" ng-model="evectionData.togetherPerson" placeholder="请输入同行人姓名" value = "{{evectionData.togetherPerson}}">
	       		</label>
	        </div>
    	</div>
    
    	<div class="row">
        	<div class="col col-20">
            	<p class="line-height-28">开始日期&nbsp;:</p>
            </div>
            <div class="col col-30 item-input-inset">
	        	<label class="item-input-wrapper">
                	<input class="padding-top-0" name="startTime" type= "date" ng-model="evectionData.startTime"  required/>
   				</label>
      		</div>
     		<div class="col">
       			<p class="line-height-28" style="color:red;" ng-show="EvectionReimburseForm.startTime.$error.required">(必填)</p>
     		</div>
    	</div>
    
    	<div class="row">
       	 	<div class="col col-20">
        		<p class="line-height-28">结束日期&nbsp;:</p>
      		</div>
      		<div class="col col-30 item-input-inset ">
	      		<label class="item-input-wrapper">
      				<input class="padding-top-0" name="endTime" type= "date" ng-model="evectionData.endTime" value = "{{evectionData.endTime}}" required/>
    			</label>
     		</div>
     		<div class="col">
        		<p style="height: 28px;line-height: 28px;color:red;" ng-show="EvectionReimburseForm.endTime.$error.required">(必填)</p>
     		</div>
    	</div>
    

    	<div class="row">
      		<div class="col col-20">
        		<p class="line-height-28">补助金额&nbsp;:</p>
      		</div>
      		<div class="col col-30 item-input-inset">
	        	<label class="item-input-wrapper">
	        		<input type="number" placeholder="请输入数字" ng-model="evectionData.subsidy" value = "{{evectionData.subsidy}}">
	      		</label>
      		</div>
	     	<div class="col">
	        	<p class="line-height-28">元</p>
	     	</div>
    	</div>
    	
    	<div class="row">
      		<div class="col col-20">
        		<p class="line-height-28">出差天数&nbsp;:</p>
      		</div>
      		<div class="col col-30 item-input-inset">
	        	<label class="item-input-wrapper">
	        		<input type="number" placeholder="请输入数字" ng-model="evectionData.evectionDay" value = "{{evectionData.evectionDay}}">
	      		</label>
      		</div>
	     	<div class="col">
	        	<p class="line-height-28">天</p>
	     	</div>
    	</div>
    
    	<div class="row">
      		<div class="col col-20">
        		<p style="height: 28px;line-height: 28px;">出差事由&nbsp;:</p>
      		</div>
    	</div>
    	
    	<div class="row">
      		<div class="col ">
       			<div style="padding:4px;border-radius:6px;background:#eeeeee;border-style:solid;">
      				<textarea  ng-model="evectionData.desc" placeholder="请输入出差事由（必填）"  rows="4" style="width: 100%" required>{{evectionData.desc}}</textarea>
       			</div>
    		</div>
   		</div>
  	</div>
  
  	<div ng-repeat="x in evectionData.expenseList">
		<div class="energized-bg content item-icon-right" style="height: 5%;padding: 1%;"><strong>费用清单&nbsp;{{$index + 1}}</strong><i class="icon ion-ios-close" style="font-size: 23px;" ng-click="delData($index,x.expId)" ></i></div>
    	<div class="row">
      		<div class="col col-20">
        		<p class="line-height-28">出发地&nbsp;:</p>
      		</div>
      		<div class="col col-30 item-input-inset">
	      		<label class="item-input-wrapper">
	        		<input type="text" placeholder="请输入城市名称" name="departure{{$index}}" ng-model="x.departure" value = "{{x.departure}}" required>
	      		</label>
      		</div>
      		<div class="col">
      			<p>
      				<span style="color:red;"ng-show="EvectionReimburseForm.departure{{$index}}.$error.required">(必填)</span>
      			</p>
      		</div>
      	</div>
    
    	<div class="row">
	      	<div class="col col-20">
	        	<p class="line-height-28">目的地&nbsp;:</p>
	      	</div>
	      	<div class="col col-30 item-input-inset">
	      		<label class="item-input-wrapper">
	        		<input type="text" placeholder="请输入城市名称" name="destination{{$index}}" ng-model="x.destination" value = "{{x.destination}}" required>
	      		</label>
	      	</div>
	       	<div class="col">
	       		<p>
      				<span style="color:red;" ng-show="EvectionReimburseForm.destination{{$index}}.$error.required">(必填)</span>
      			</p>
	       	</div>
    	</div>
    	
    	<div class="row">
      		<div class="col col-20">
       			<p class="line-height-28">出发时间&nbsp;:</p>
      		</div>
      		<div class="col col-30 item-input-inset">
	      		<label class="item-input-wrapper">
      					<input class="padding-top-0" type= "date" name="sdate{{$index}}" ng-model="x.sdate" value = "{{x.sdate}}" required/>
    			</label>
      		</div>
     		<div class="col">
        		<p class="line-height-28" style="color:red;" ng-show="EvectionReimburseForm.sdate{{$index}}.$error.required">(必填)</p>
     		</div>
    	</div>
    
      	<div class="row">
      		<div class="col col-20">
       			<p class="line-height-28">到达时间&nbsp;:</p>
      		</div>
      		<div class="col col-30 item-input-inset">
	      		<label class="item-input-wrapper">
      					<input class="padding-top-0" name="edate{{$index}}" type= "date" ng-model="x.edate" value = "{{x.edate}}" required/>
    			</label>
      		</div>
     		<div class="col">
        		<p class="line-height-28" style="color:red;" ng-show="EvectionReimburseForm.edate{{$index}}.$error.required">(必填)</p>
     		</div>
    	</div>
    
     	<div class="row">
      		<div class="col col-20">
        		<p style="height: 28px;line-height: 28px;">交通方式&nbsp;:</p>
      		</div>
      		<div class="col col-30 ">
            	<div style="padding:2px;height:28px;border-radius:4px;background:#eeeeee;border-style:solid;">
            		<select ng-model="x.transportation" name="transportation{{$index}}" style="border: none;outline:none;background-color: transparent;width: 100%;" data-tap-disabled="true" required>
                		<option ng-repeat="y in x.traSelect" value = "{{y.code}}" ng-selected="{{y.selected}}" >{{y.name }}</option>
            		</select>
      			</div>
      		</div>
       		<div class="col">
	       		<p>
      				<span style="color:red;" ng-show="EvectionReimburseForm.transportation{{$index}}.$error.required">(必选)</span>
      			</p>       			
       		</div>
    	</div>
    
    	<div class="row">
      		<div class="col col-20">
        		<p style="height: 28px;line-height: 28px;">交通费用&nbsp;:</p>
      		</div>
      		<div class="col col-30 item-input-inset">
	      		<label class="item-input-wrapper">
	        		<input type="number" placeholder="请输入数字" ng-model="x.transportationFee" value = "{{x.transportationFee}}">
	      		</label>
      		</div>
		    <div class="col">
		        <p class="line-height-28">元</p>
		    </div>
    	</div>
    
    	<div class="row">
     		<div class="col col-20">
        		<p style="height: 28px;line-height: 28px;">住宿费用&nbsp;:</p>
      		</div>
      		<div class="col col-30 item-input-inset">
	     		<label class="item-input-wrapper">
	        		<input type="number" placeholder="请输入数字" ng-model="x.horelFee" value = "{{x.horelFee}}">
	      		</label>
      		</div>
     		<div class="col">
        		<p style="height: 28px;line-height: 28px;">元</p>
     		</div>
    	</div>
    
    	<div class="row">
      		<div class="col col-20">
        		<p class="line-height-28">其他费用&nbsp;:</p>
      		</div>
      		<div class="col col-30 item-input-inset">
	      		<label class="item-input-wrapper">
	        		<input type="number" placeholder="请输入数字" ng-model="x.otherFee" value = "{{x.otherFee}}">
	      		</label>
      		</div>
     		<div class="col">
        		<p class="line-height-28">元</p>
     		</div>
    	</div>
    
    	<div class="row">
      		<div class="col col-20">
        		<p style="height: 28px;line-height: 28px;">备注&nbsp;:</p>
      		</div>
    	</div>
    	<div class="row">
      		<div class="col ">
       			<div style="padding:4px;border-radius:6px;background:#eeeeee;border-style:solid;">
      				<textarea ng-model="x.remarks" placeholder="请输入备注（必填）" rows="4" style="width: 100%" required>{{x.remarks}}</textarea>
       			</div>
    		</div>
   		</div>
  	</div>
	<HR  width="100%" color=#987cb9 SIZE=1 >

    <div class="row content" style="text-align: center;">
  		<div class="col" ><button class="button  button-royal" style="width: 85%;height: 10px;" ng-click="addExpenseList()">新增费用清单</button></div>
	</div>
    <HR  width="60%" color=#987cb9 SIZE=1 >
	<p style="padding-left: 20%;">总报销金额(元)&nbsp;:&nbsp;<span style="color:#ED7233;">{{evectionData.money}}{{sum()}}</span></p>
	<HR  width="60%" color=#987cb9 SIZE=1 >

	<div class="row content" style="text-align: center;margin-top: 20px;" ng-show="{{buttonShowState}}">
  		<div class="col" ><button class="button  button-calm" style="width: 70%;" ng-click="saveEvectionDetailInfo()" ng-disabled = "EvectionReimburseForm.$invalid">保存</button></div>
  		<div class="col" ><button class="button  button-assertive" style="width: 70%;" ng-click = "submitEvectionDetailInfo()"  ng-disabled = "{{submitButtonState}}">提交</button></div>
	</div>
</form>
  </ion-content>
</ion-modal-view>
